<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@include file="mytags.jsp"%>
<t:base type="jquery"></t:base>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>申请认证会员</title>
</head>
<body>
<t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" action="loginWxController.do?userBindSubmit"
			 tiptype="tipType"  validFormName="formValidName" showAllError="false" callback="callback">
<input type="hidden" name="approvalStatus" value="0">
<input type="hidden" name="openId" value="${openId }">
	<div class="geren">
	<img src="${webRoot }images/about.jpg">个人信息
</div>
<div class="mui-content" style="margin: 0 auto; margin-top: 10px; width: 100%; padding: 0 15px;">
<input type="hidden" name="userName" id="userName" value="${user.userName }">
	<div class="mui-input-group">
		<div class="mui-input-row">
			<label class="dg"><img src="${webRoot }images/xx1.png" style="width: 12px">姓名</label>
			<input  type="text" class="mui-input" value="${user.realName}"  <c:if test="${not empty user.realName}">readonly</c:if> dataType="*" nullmsg="请填写姓名！">
		</div>
		<div class="mui-input-row">
			<label class="dg"><img src="${webRoot }images/phone.png" style="width: 12px">手机号</label>
			<input  type="text" class="mui-input" value="${user.mobilePhone}" <c:if test="${not empty user.realName}">readonly</c:if> name="phoneNumber" id="phoneNumber" dataType="cPhone"  nullmsg="请填写电话！" errormsg="请正确填写电话">
		</div>
		<div class="mui-input-row">
			<label class="dg"><img src="${webRoot }images/xx5.png" style="width: 12px">邮箱</label>
			<input  type="text" class="mui-input-clear mui-input" placeholder="必填项" name="email" value="${bindUserInfo.email }" id="email" dataType="e" nullmsg="请填写邮箱！" errormsg="请正确填写邮箱">
		</div>
		<div class="mui-input-row mui-input-row1" style="margin-bottom:5px;">
			<label class="dg"><img src="${webRoot }images/xx8.png" style="width: 12px">职位</label>
			<t:dictSelect field="departName" clazz="sele mui-icon mui-icon-arrowdown" id="departName" defaultVal="${bindUserInfo.departName }" hasPleaseSelect="true" extendJson="{'dataType':'*','nullmsg':'请选择职位'}" hasLabel="false" type="select" typeGroupCode="<%=StaticValue.DIC_CINEMA_DEPART %>">
			</t:dictSelect>
		</div>
	</div>
</div>
<div class="geren">
	<img src="${webRoot }images/about.jpg">影院信息
</div>
<div class="mui-content" style="margin: 0 auto; margin-top: 10px; width: 100%; padding: 0 15px;">
	<div class="mui-input-group">
		<div class="mui-input-row">
			<label class="dg" style="width: 120px;"><img src="${webRoot }images/xx6.png" style="width: 12px">所属影院 </label>
			<input id='account' placeholder="必填项" type="text" class="mui-input-clear mui-input" name="cinemaName" id="cinemaName" value="${bindUserInfo.cinemaName }" dataType="*" nullmsg="请填写所属影院">
		</div>
        <div class="mui-input-row">
            <label class="dg" style="width: 120px;"><img src="${webRoot }images/xx6.png" style="width: 12px">所属院线 </label>
            <input  placeholder="必填项" type="text" class="mui-input-clear mui-input" name="chainName" id="chainName" value="${bindUserInfo.chainName }" dataType="*" nullmsg="请填写所属院线">
        </div>
		<div class="mui-input-row">
			<label class="dg" style="width: 120px;"><img src="${webRoot }images/fs.png" style="width: 12px">经营方式 </label>
			<div class="mui-input-row mui-radio mui-left ra">
				<label>直营</label>
				<input name="marketingType" type="radio" value="<%=StaticValue.DIC_DIRECT_WAY%>" checked="checked">
			</div>
			<div class="mui-input-row mui-radio mui-left ra">
				<label>加盟</label>
				<c:set value="<%=StaticValue.DIC_LEAGUE_WAY%>" var="leagueWay"/>
				<input name="marketingType" type="radio" value="<%=StaticValue.DIC_LEAGUE_WAY%>" <c:if test="${bindUserInfo.marketingType eq leagueWay }">checked="checked"</c:if>>
			</div>
		</div>
		<div class="mui-input-row">
			<label class="dg" style="width: 120px;"><img src="${webRoot }images/dress.png" style="width: 12px">影院地址 </label>

			<select class="sele" style="width: 25%;float:left" name="province.id" id="province" onchange="loadCity()">
				<c:forEach items="${territoryList }" var="terr">
					<option value="${terr.id }" <c:if test="${bindUserInfo.province.id eq terr.id }">selected="selected"</c:if>>${terr.territoryName }</option>
				</c:forEach>
			</select>
            <select class="sele" style="width: 25%;float:left" name="city.id" id="city">

            </select>
		</div>
		<div class="mui-input-row">
			<input type="text" class="mui-input-clear mui-input" placeholder="必填项,精确到门牌号" style="font-size:14px;" name="address" id="address" value="${bindUserInfo.address }">
		</div>
		<div class="mui-input-row mui-input-row1" style="margin-bottom:5px;">
			<label class="dg" style="width: 145px;">
			<img src="${webRoot }images/tell.png" style="width: 12px">影院联系电话 </label>
			<input type="text" class="mui-input-clear mui-input" placeholder="此处填写" style="width: 130px;" name="cinemaPhoneNumber"  id="cinemaPhoneNumber" value="${bindUserInfo.cinemaPhoneNumber }">
		</div>
	</div>
</div>
<div class="mui-clearfix">
</div>
<div class="mui-content-padded">
<!-- 	<a class="mui-btn mui-btn-block mui-btn-primary" href="shq_com.html">提交</a> -->
	<a class="mui-btn mui-btn-block mui-btn-primary" href="javascript:formSub();" >提交</a>
</div>
</t:formvalid>
</body>

<script type="text/javascript">

$(function(){
	
	loadCity('${bindUserInfo.city.id}');
});


/**验证提示*/
function tipType(msg,o,cssctl){
	if(o.type == 3){
		mui.toast(msg);
	}
}
//表单提交
function formSub(){
	$('#formobj').submit();
}
//二级联动
function loadCity(cityId){
	var id = $('#province').val();
	$.post('loginWxController.do?getTerritoryCity',{id:id},function(data){
		data = $.parseJSON(data);
		$('#city').find('option').remove();
		var str = "";
		for(var i = 0;i<data.length;i++){
			str +='<option value="'+data[i].id+'">'+data[i].territoryName+'</option>';
		}
		$('#city').append(str);
		if(cityId != ''){
			$('#city').val(cityId);
		}
	});
	
}

function callback(data){
	mui.createMask().show();
	mui.toast(data.msg);
	setTimeout('window.location.href="loginWxController.do?goAfterBind"',1000);
}
</script>
</html>